<!DOCTYPE html>
<html ng-app>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <script src="angular.min.js"></script>
    <script src="http://cdn.static.runoob.com/libs/angular.js/1.4.6/angular.min.js" type="text/javascript" charset="utf-8"></script>
    <script>
        function aa($scope,$timeout) {
            $scope.iphone = {
                money:5,
                num:1
            };
        }

    </script>
</head>
<body>

<main>
    <div ng-controller="aa">
        <p>价格：<input type="text" ng-model="iphone.money"></p>
        <p>数量：<input type="text" ng-model="iphone.num"></p>
        <p>总价{{ iphone.money * iphone.num }}</p>
    </div>
</main>

</body>
</html>
